package com.flow.component;

import com.flow.entity.MyContext;
import com.yomahub.liteflow.core.NodeComponent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * ComponentE
 *
 * @author grl
 * @date 2024/4/17
 */
@Slf4j
@Component("e")
public class ComponentE  extends NodeComponent {

    @Override
    public void process() {
        //do your business
        MyContext context = this.getContextBean(MyContext.class);
        Object requestData = this.getRequestData();
        Integer row = context.getRow() == null ? (Integer)requestData : context.getRow();
        context.setRow(row +3);
        log.error("组件E被执行了 {}",context.getRow());
    }
}
